Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apm: fix race in DefaultTracer #1248

Merged
merged 1 commit into from
May 20, 2022
Merged

apm: fix race in DefaultTracer #1248

merged 1 commit into from
May 20, 2022

Conversation

axw
Copy link
Member

@axw axw commented May 20, 2022

Fix a race in DefaultTracer which could lead to two tracers being created, one of which would be closed.
We must hold the write lock while creating the default tracer, checking again that it was not set after releasing the read lock.

Fixes #1247

Fix a race in DefaultTracer which could lead
to two tracers being created, one of which
would be closed. We must hold the write lock
while creating the default tracer, checking
again that it was not set after releasing the
read lock.
@axw axw requested a review from a team May 20, 2022 01:01
Copy link
Contributor

@marclop marclop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!

@axw axw enabled auto-merge (squash) May 20, 2022 01:09
@apmmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-05-20T01:01:08.680+0000

  • Duration: 41 min 27 sec

Test stats 🧪

Test Results
Failed 0
Passed 7372
Skipped 174
Total 7546

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark test.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@apmmachine
Copy link
Contributor

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (59/59) 💚
Files 99.346% (152/153)
Classes 96.812% (334/345)
Methods 90.35% (955/1057)
Lines 82.621% (11063/13390)
Conditionals 100.0% (0/0) 💚

@axw axw merged commit f6b3385 into elastic:main May 20, 2022
@axw axw deleted the defaulttracer-race branch May 20, 2022 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrent calls to DefaultTracer results in 2 tracers existing with one being inactive
3 participants